import http from '@/api'

// * 获取购物车列表
export const getShopApi = () => http.get('/shop-cart')

// * 修改购物车数量
export const updateShopApi = (data) => http.put('/shop-cart', data)

// * 添加购物车商品
export const addShopApi = (data) => http.post('/shop-cart', data)

// * 删除购物车商品
export const delShopApi = (id) => http.delete(`/shop-cart/${id}`)

// * 根据选中商品 生成订单信息
export const createOrderApi = (ids) => http.get('/shop-cart/settle', { cartItemIds: ids })
